import request from '@/utils/request'

export const GetRoleService = () => {
  return request.get('/role/list')
}

export const AddRoleService = (data) => {
  return request.post('/role/add', data)
}

export const EditRoleService = (data) => {
  return request.put('/role/update', data)
}

export const DelRoleService = (id) => {
  return request.delete('/role/delete', {
    params: { id }
  })
}

export const GetRoleDetailService = (id) => {
  return request.get('/role/findById', {
    params: { id }
  })
}

export const GetRoleFindByQueryService = (roleName) => {
  return request.get('/role/findByQuery', {
    params: { roleName }
  })
}